package voa;

import java.io.File;
import java.util.List;

import util.FileProcessor;

public class ParagraphDirProcessor implements FileProcessor {

	@Override
	public void process(File dir) {

		if (dir.isDirectory()) {

			LrcFiles lrcFiles = LrcFiles.instance(dir.getAbsolutePath());

			List fileList = lrcFiles.getFileList();

			if (fileList.size() > 0) {

				for (int i = 0; i < fileList.size(); i++) {

					File file = (File) fileList.get(i);

					getProcessor().process(file);
				}
			}
		}
	}
	
	private FileProcessor getProcessor(){
		
		return new ParagraphFileProcessor();
	}

}
